package com.le.book.dao;

import java.sql.Date;
import java.sql.SQLException;

import com.le.book.util.DBHelper;

public class BookDAO {
	
	
	public void insert(String id, String name, String author, Date pressdate, int price) throws SQLException {
		String sql = "insert into book values (seq_pub.nextval, ?, ?, null, ?, default, ?, 1)";
		DBHelper.update(sql, name, author, pressdate, price);
		
	}
	
	
	public void update(String id, String name, String author, Date pressdate, int price) throws SQLException {
		String sql = "update book set name = ?, author = ?, pressdate = ?, price = ? where id = ?)";
		DBHelper.update(sql, name, author, pressdate, price, id);
		
	}
	
	public void select() {
		
	}
}
